package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StorePurchaseBillEntity;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 仓库采购单 保存对象
 *
 * @author xueqz 2021-03-07
 */
@Data
@ApiModel("仓库采购单-保存对象")
public class StorePurchaseBillSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "单号")
    private String billNo;

    @ApiModelProperty(value = "采购供应商")
    private Integer supplierId;

    @ApiModelProperty(value = "采购员")
    private Integer purchaseUser;

    @ApiModelProperty(value = "采购大仓")
    private Integer storeId;

    @ApiModelProperty(value = "所属客户id")
    private Integer memberId;

    @ApiModelProperty(value = "状态：0-待审核,1-审核通过（待入库）,2-到货异常,3-已完成,9-已取消")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "审批人")
    private Integer examineUser;

    @ApiModelProperty(value = "审批时间")
    private LocalDateTime examineTime;

    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    @ApiModelProperty(value = "逻辑删除，0-未删除 1-已删除")
    private Boolean deleted;

    public StorePurchaseBillEntity convertEntity() {
        StorePurchaseBillEntity target = new StorePurchaseBillEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
